package org.xfy.ymcc.feign.fallback;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import org.xfy.common.result.JsonResult;
import org.xfy.ymcc.feign.UserFeignClient;

@Component
public class UserFeignClientFallbackFactory implements FallbackFactory<UserFeignClient> {
    @Override
    public UserFeignClient create(Throwable throwable) {
        return new UserFeignClient() {
            @Override
            public JsonResult getLogin(Long loginId) {
                return JsonResult.error("getLogin调用失败");
            }
        };
    }
}
